package com.cwx.dao;

import com.cwx.domain.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.sql.SQLOutput;
import java.util.List;

public interface UserDao {

    @Select("select * from tab_users")
    //查询所有用户信息
    List<User> findAll();

    @Delete("delete from tab_users where id=#{id}")
    //删除用户信息
    void delete(Integer id);

    //根据id查询用户
    @Select("select * from tab_users where id =#{id}")
    public User findById(Integer id);
}
